class FaqsController < ApplicationController

	

	def index
		@faqs = Faq.all
	end
	
	def new
		@faq = Faq.new		
	end

	def create
		@faq = Faq.new(params[:faq])
		if @faq.save
		redirect_to(:action => 'index')
		else
		render('new')
		end
	end
	
	def edit
		@faq = Faq.find(params[:id])
	end
	
	def update
		@faq = Faq.find(params[:id])
		if @faq.update_attributes(params[:faq])
		redirect_to(:action => 'index')
		else
		render('edit')
		end
	end

	def delete
		@faq = Faq.find(params[:id])
	end

	def destroy
		Faq.find(params[:id]).destroy
		redirect_to(:action => 'index')
	end
end
